package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.QueryForObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);
    //查总数
    int queryForCount(QueryForObject qo);
    //查分页数据
    List<Employee> queryForList(QueryForObject qo);
    //检查用户名
    Employee checkName(String username);
    //改变状态
    void changeState(Long id);
    //维护关系
    void insertRelation(@Param("empId") Long empId, @Param("roleId")Long roleId);
    //删除关系

    void deleteRelation(Long id);
    //重置密码
    void resetPassword(Employee record);

    List<Employee> queryEmployeeListByDepartmentId(Long departmentId);

    List<Employee> queryHeadteacher();

    List<Long> queryRoleByEmpId(Long empId);

    Employee queryPicUrlByEmpId(Long empPicId);

    void saveImageUrl(Employee employee);
}